/**
 * Created by jiajh on 2016/9/2.
 */
var oMusic;
var oVideo;

window.onload = function () {

    console.log("watereff init");
    oVideo = document.getElementById("MainVideo");
    watereff.init();

    //*
    var oStop = document.querySelector('.stop');
    var oRotate = document.querySelector('.music');
    var oMusic = document.getElementsByTagName('audio')[0];
    var oReplay = document.querySelector('.replay');
    var browser = {
        versions: function () {
            var u = navigator.userAgent, app = navigator.appVersion;
            return {//移动终端浏览器版本信息
                android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //android终端或者uc浏览器
            };
        }(),
        language: (navigator.browserLanguage || navigator.language).toLowerCase()
    };
};

function videoStart() {
    clearInterval(watereff.interval);
    $(".loading").fadeOut();
    oVideo.play();
    oVideo.addEventListener("ended", function () {
        //console.log((new Date()).getTime());
        oVideo.pause();
        // $(".page-home").empty();
        $("#MainVideo").remove();
        showPage("vr");
    }, false);
}

